package LearnEnum;

public class Main {
    public static void main(String[] args) {
        Weekday day = Weekday.SUN;
        switch (day) {
            case MON:
            case TUS:
            case WED:
            case THU:
            case FRI:
                System.out.println(day + " is a work day!");
                break;
            case SAT:
            case SUN:
                System.out.println(day + " is weekend!");
                break;
            default:
                throw new RuntimeException("cannot process " + day);
        }
        String somestr = Weekday.MON.chinese;
        System.out.println(somestr);

    }
}

enum Weekday {
    MON(1, "星期一"),TUS(2, "星期二"),WED(3, "星期三"),THU(4, "星期四"),FRI(5, "星期五"),SAT(6, "星期六"),SUN(0, "星期日");

    final int value;
    final String chinese;

    private Weekday(int value, String chinese) {
        this.value = value;
        this.chinese = chinese;
    }

    @Override
    public String toString() {
        return chinese;
    }
}